(function(){
		
	//2. 商家进货
	var bus_a = require("./1. 注册商家").bus_a;
	var TagCon = require("../bus.tag/_con");
	var GoodsCon = require("../goods/_con");

	//仓库进货
	var goods_1_id = bus_a.importGoods({
		name:"小包包",
		price:50,
	},100);

	var goods_2_id = bus_a.importGoods({
		name:"大包包",
		price:50,
	},100);

	var goods_3_id = bus_a.importGoods({
		name:"肉片",
		price:100,
	},100);

	console.log("商家的现有标签：",bus_a.getTags());

	console.log("添加标签“穿”、“吃”");
	var tag_1_id = bus_a.addTag("穿")
	var tag_2_id = bus_a.addTag("吃")

	console.log("商家的现有标签：",bus_a.getTags());

	console.log("手动归类商品");
	bus_a.addGoodsToTag(tag_1_id,goods_1_id);
	bus_a.addGoodsToTag(tag_1_id,goods_2_id);
	bus_a.addGoodsToTag(tag_2_id,goods_3_id);

	console.log("商家的现有标签详情：");
	bus_a.getTags().forEach(function(tag) {
		console.log(tag.tag_name,tag.getGoods());
	});

	console.log("商家某件商品与其标签现有详情：");
	console.log(GoodsCon.get(goods_3_id),GoodsCon.get(goods_3_id).getTags());

	bus_a.removeTag(tag_2_id);
	console.log("删除一个标签后这个商品与标签有详情：");
	console.log(GoodsCon.get(goods_3_id),GoodsCon.get(goods_3_id).getTags());



	module.exports = {
		bus_a:bus_a
	};
}());
